/*
 * Get application settings from file 
*/

package com.costeaalex.blueserver.settings;

import java.io.File;
import java.io.FileInputStream;
import java.io.ObjectInputStream;

public class AppSettingsGet
	{
	
	private File f=new File("Settings.dat");
	private FileInputStream fR;
	private ObjectInputStream oIS;
	private Settings settingsObj;
	
	public AppSettingsGet()
		{
		
		}
	
	public Settings getSettings()
		{
		if(f.exists())
			{
			try
				{
				fR=new FileInputStream(f.getAbsolutePath());
				oIS=new ObjectInputStream(fR);
				settingsObj=(Settings) oIS.readObject();
				return settingsObj;
				} 
			catch (Exception e)
				{
				e.printStackTrace();
				}
			}
		
		return null;
		}
	
	}
